<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
    <script type="text/javascript" src="static/jquery-easyui-1.5.5/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="static/jquery-easyui-1.5.5/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="static/jquery-easyui-1.5.5/themes/icon.css">
    <script type="text/javascript" src="static/jquery-easyui-1.5.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="static/jquery-easyui-1.5.5/locale/easyui-lang-zh_CN.js"></script>
    <script src="https://api.yum6.cn/yan.php?format=js"></script>
<title>Insert title here</title>
<script>
    if(window != top) {
        top.location.href = location.href;
    }    
</script>
   <script type="text/javascript">

        $(function () {

            $("#login").dialog({
                iconCls: "icon-tip",
                title: "登录",
                width: 420,
                height: 250,
                /*是否模态*/
                modal: true,
                /*定义是否显示关闭按钮*/
                closable: false,
                /*定义是否可拖拽窗口*/
                draggable: false,
                buttons: '#btn'
            });

            $("#username").textbox({
                /*是否为必填字段*/
                required: true,
                /*在没有输入时的提示*/
                missingMessage: "亲亲，您忘记输入用户名了哦",
                /**/
                validType: ['length[4,20]'],
                invalidMessage: "亲亲，用户名长度不对哦",
                iconCls: 'icon-man',
            });

            $("#password").passwordbox({
                /*是否为必填字段*/
                required: true,
                /*在没有输入时的提示*/
                missingMessage: "亲亲，您忘记输入密码了哦",
                validType: ['length[4,20]'],
                invalidMessage: "亲亲，密码长度不对哦",
                /*是否显示眼睛图标*/
                showEye: false
            });
            
            $('#btn a').click(function() {
                console.log('你点击额');
                $('#ff').form('submit', {
                    url: 'login',
                    // novalidate: true,
                    // ajax: false,
                    success: function(data) {
                    }
                });
            });

        });
    </script>
    <style type="text/css">

        body {
            background: #D4D4D4;
        }

        label {
            float: left;
            text-align: right;
            width: 80px;
            font-size: 16px;
        }

        #login {
            padding: 25px 30px;
        }

        p {
            padding-bottom: 10px;
        }

        input {
            width: 190px;
        }
        
        #btn {
            text-align: center;
        }

    </style>
</head>
<body>
    <form action="login" method="post" id="ff">
    
    <div id="login">
        <p><label for="username">用户名：</label><input id="username" name="username" type="text"></p>
        <p><label for="password">密码：</label><input id="password" name="password" type="password"></p>
    </div>
    <div id="btn">
	    <a class="easyui-linkbutton">登录</a>
    </div>
    </form>
    
</body>
</html>